I am trying to solve a system of homogeneous linear equations like Ax=0
.
Here is an example matrix which has already been reduced for simplicity:
1 2 | 0
3 6 | 0
The solution I am hoping to get is at least [ 2, -1 ]
. But the fundamental solution is [2C; -1C]
. You can see that Det(A) = 0
and Rank(A) = 1
. Of course you know that such systems have trivial solution [0,0]
.
I am trying:
Matrix<double> A = Matrix<double>.Build.DenseOfArray(new double[,]
{
{ 1, 2 },
{ 3, 6 }
});
Vector<double> B = Vector<double>.Build.Dense(new double[] { 0, 0 });
var result = A.Solve(B); //result = Nan, Nan.
This solution doesn't work for my situation (B = 0, Det(A) = 0).